#include <stdio.h>
#include <string.h>
#include "md5/md5.h"
int main()
{
    const md5_byte_t *data = "All is well!";
    md5_byte_t digest[16];
    md5_state_t md5StateT;
    md5_init(&md5StateT);
    md5_append(&md5StateT, data, strlen(data));
    md5_finish(&md5StateT, digest);
    char md5String[33] = { '\0' }, hexBuffer[3];
    for (size_t i = 0; i != 16; ++i)
    {
        if (digest[i] < 16)
            sprintf(hexBuffer, "0%X", digest[i]);
        else
            sprintf(hexBuffer, "%X", digest[i]);
        strcat(md5String, hexBuffer);
    }
    printf("%s\n", md5String);
    //system("pause");
    return 0;
}
